﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.Composition;
using System.Web.Mvc;
using Microsoft.ComponentModel.Composition.Extensions.Web;

namespace Steve.UI.Site.Controllers
{
    [SiteMasterData]
    [Export(typeof(IController))]
    [ExportMetadata("Name", "Account")]
    [ExportMetadata("Mode", WebScopeMode.Request)]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public sealed class AccountController : Steve.UI.Controllers.AccountControllerBase
    {
        public override System.Web.Mvc.ActionResult LogOn(string returnUrl, bool? notMe)
        {
            if (notMe.HasValue && notMe.Value)
            {
                SiteMasterDataAttribute.ClearUser(ViewData);
            }

            return base.LogOn(returnUrl, notMe);
        }
    }
}